package com.dwb.service;

import com.dwb.entity.SRuzhu;
import com.dwb.mappers.SRuzhuMapper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.Map;

/**
 * @Author manke
 * @Date 2020/6/28 20:15
 * @Version 0.0.1
 */
@Service
public class SRuzhuService {
    @Autowired
    private SRuzhuMapper sRuzhuMapper;
    public PageInfo<SRuzhu> getList(Map<String, String> parameters) {
        Example example = new Example(SRuzhu.class);
        Example.Criteria criteria = example.createCriteria();
        sRuzhuMapper.selectByExample(example);
        return null;


    }

    public SRuzhu getInfo(Map<String, String> parameters) {

        return sRuzhuMapper.selectByPrimaryKey(Integer.parseInt(parameters.get("id")));

    }
}
